<template>
 <view>
  <view class="top">
  	<image src="../../static/loginLogo.png" mode="" class="img"></image>
	<view class="mobile">{{mobile}}</view>
  </view>
  <view class="account" @click="switchAccount">
  	<image src="../../static/account.png" mode="" class="switchIcon"></image>
	<view class="switch_account" >
		退出登录
	</view>
  </view>
 </view>
</template>

<script>
import date from '../../utils/date.js'
 export default {
   data () {
     return {
	   mobile:'',
     }
   },
   components: {

   },
   methods: {
    switchAccount(){
 uni.showModal({
		       title: '提示',
		       content: '是否要切换账号?',
		       success: function (res) {
		           if (res.confirm) {
					   uni.clearStorageSync()
						 uni.redirectTo({
						 	url: '/pages/login/index'
						 }); 
		           } 
		       }
		   });
	}
   },
   mounted() {
	    let userinfo = uni.getStorageSync('userinfo');
   this.mobile=date.phoneNumFilter(userinfo.mobile)
     
   },
   watch: {

   },
   computed: {

   }
 }
</script>

<style scoped lang='scss'>
.top{
	width: 100%;
	height: 170rpx;
	background: #FFFFFF;
	display: flex;
	align-items: center;
	padding: 0rpx 32rpx;
}
.img{
	width: 134rpx;
	height: 134rpx;	
}
.mobile{
	margin-left: 30rpx;
	font-size: 32rpx;
	color: #0A0B16;
}
.account{
	width: 100%;
	height: 116rpx;
	background: #FFFFFF;
	display: flex;
	align-items: center;
	padding: 0rpx 32rpx;
	margin-top: 32rpx;
}
.switchIcon{
	width: 34rpx;
	height: 34rpx;
}
.switch_account{
	margin-left: 20rpx;
	color: #0A0B16;
	font-size: 32rpx;
}
</style>
<style>
page{
    background: #FAFAFA;
}
</style>